<?php
//error_reporting(E_ALL);
include "../../include/common.inc.php";
header("Content-type: text/html; charset=utf-8");
session_start();
include "../adminyz.php";

  include WEB_CLASS.'mycrm_class.php';
  $doctor =new Mycrm('{tablepre}doctor');
  $doctor_list=$doctor->GetList(array('id','doctor'),0,100,'status=1 AND departmentsid='.$departmentsid,'sort DESC');
  $json_ar = array(0=>'[全部]');
  foreach($doctor_list as $key=>$value){
    $json_ar[$value['id']] = ANY2UTF($value['doctor']);
  }
  unset($json_ar[$noid]);
echo json_encode($json_ar);

function ANY2UTF($str)
{
  // mb_detect_encoding($str, 'UTF-8, GBK, GB2312, ISO-8859-1', true)
  $str = @mb_convert_encoding($str, 'UTF-8', 'gb2312');
  return $str;
}
?>